//import from 就是es6的导入模块

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import http from './plugins/http'
import layout from './components/layout.vue'
import VCharts from 'v-charts'
// console.log(http);


//引入elementUI
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
Vue.use(VCharts)

// let vm =new Vue
Vue.prototype.$http = http

//通过用户的所有权限id检查新增用户(分类)权限是否存在
Vue.prototype.$checkPermission = function(permissionId){
    return store.state.user.permissionIds.includes(permissionId)
}

Vue.component('layout',layout)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
